package com.transmit.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class JacksonSerialize {
    JacksonSerialize() {
    }

    public static <T> String serialize(T t) {
        ObjectMapper objectMapper = new ObjectMapper();

        try {
            return objectMapper.writeValueAsString(t);
        } catch (JsonProcessingException var3) {
            return "";
        }
    }

    public static <T> T deserialize(String value, Class<T> valueType) {
        ObjectMapper objectMapper = new ObjectMapper();

        try {
            return objectMapper.readValue(value, valueType);
        } catch (Exception var4) {
            return null;
        }
    }
}

